<template>
    <div class="table">
        <el-table :data="items" style="width: 100%;" height="500">
            <el-table-column type="index" width="50" />
            <el-table-column prop="name" label="用户名" width="180" />
            <el-table-column prop="tag_name" label="标签" width="180" />
            <el-table-column prop="rate" label="评分" width="180" />
            <el-table-column prop="picture" label="资源" width="180" />
            <el-table-column prop="remark" label="描述" />
            <el-table-column label="创建时间" prop="create_date" width="180">
                <template slot-scope="scope">
                    <span>{{ deal_date(scope.row.create_date) }}</span>
                </template>
            </el-table-column>
            <el-table-column label="修改时间" prop="editor_date" width="180">
                <template slot-scope="scope">
                    <span>{{ deal_date(scope.row.editor_date) }}</span>
                </template>
            </el-table-column>
            <el-table-column label="操作" align="center">
                <template slot-scope="scope">
                    <slot name="option" :row="scope.row" />
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
import _md5 from 'crypto-js'
import moment from 'moment'
export default {
    props: {
        items: {
            type: Array,
            default: []
        }
    },
    data() {
        return {}
    },
    methods: {
        deal_date(date) {
            return moment(date).format('YYYY-MM-DD HH:mm:ss')
        }
    }
}
</script>

<style></style>